__author__ = 'Lenka'

from selenium.webdriver.common.by import By

from php4dvd.pages.page import Page


class UserProfilePage(Page):
    """
    This is a common description of the 'My profile' page.
    """
    @property
    def username_field(self):
        return self.driver.find_element(By.XPATH, ".//input[@name='username']")

    @property
    def email_field(self):
        return self.driver.find_element(By.XPATH, ".//input[@name='email']")

    @property
    def is_this_page(self):
        return self.is_element_visible((By.CSS_SELECTOR, "nav"))
